<?php
/* @var $this AnalysisController */

?>
<table class="list_table" cellpadding="0" cellspacing="0" width="100%">
 	<tbody>
		<tr>
			<td class="pl15"><?php echo CHtml::link(mb_substr($data->zpt_title,0,14,'utf8'),'javascript:',array('class'=>''))?></td>
			<td width="30%"><?php echo date('Y-m-d H:i',$data->zpt_start_time)?> - <?php echo date('Y-m-d H:i',$data->zpt_end_time)?></td>
			<td width="15%"><?php echo round(($data->zpt_end_time-$data->zpt_start_time)/3600)?>小时</td>
			<td width="10%" class="fw_b"><?php echo $data->zpt_limit_nums?></td>
			<td width="12%">
				<?php
					if($data->zpt_status==1){
						echo "正在审核";
					}elseif($data->zpt_status==2){
						 if($data->zpt_start_time>time()){
								echo "等待开始";
							}elseif($data->zpt_end_time<time()){
								echo "已经结束";
							}else{
								if($data->zpt_close==1){
									echo "正在进行";
								}elseif($data->zpt_close==2){
									echo "已经关闭";
								}
							}
					}elseif($data->zpt_status==3){
						echo "未通过";
					}
				 ?>
			</td>
			<td width="12%">
				<?php if($data->zpt_start_time<time()&&$data->zpt_end_time>time()&&$data->zpt_status==2) echo CHtml::link(($data->zpt_close==1)?Yii::t('cmp','Stop'):Yii::t('cmp','Run'),array('changeSnapup','id'=>$data->zpt_id),array('class'=>'c_06c')) //启动停止?>
				<?php if(!($data->zpt_start_time<time()&&$data->zpt_end_time>time()&&$data->zpt_status==2)) echo CHtml::link(Yii::t('glo','Update'),array('updateSnapup','id'=>$data->zpt_id),array('class'=>'c_06c')) //编辑?>
				<?php if(!($data->zpt_start_time<time()&&$data->zpt_end_time>time()&&$data->zpt_status==2)) echo CHtml::link(Yii::t('glo','Delete'),'javascript:',array('class'=>'c_06c','onclick'=>'return art_del_confirm("'.$this->pre_module_url.'/promotion/deleteSnapup/id/'.$data->zpt_id.'","你确定要删除这条信息吗？")')) //删除?> 
			</td>
		</tr>
	</tbody>
</table>
 